package com.sjtu.dao.model;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.util.Date;

/**
 * nerine
 * 1/28/2020
 */
@MappedSuperclass
@Getter
@Setter
@Where(clause="is_deleted = 0")
public abstract class BaseModel {
    /** 逻辑删除标识（0：未删除 1：已删除） */
    @Column
    private Integer isDeleted;
    /** 创建时间 */
    @Column(updatable = false)
    private Date createdDate;
    /** 创建人 */
    @Column(updatable = false)
    private String createdBy;
    /** 更新时间 */
    private Date updatedDate;
    /** 更新人 */
    private String updatedBy;
}
